<?php
    include("./dbconn.php");

    $page = $_GET["page"];
    $pageSize = 6;

    $start = ($page - 1) * $pageSize;
    $sql = "select * from wenhlw order by Id desc limit $start,$pageSize";

    $result = $conn->query($sql);

    if ($result->num_rows >0){
        while($row = mysqli_fetch_assoc($result)){
            $list[] = $row;
        }
        $data["code"] = 0;
        $data["list"] = $list;
    }else{
        $data["code"] = 1;
        $data["msg"] = '没有更多数据';
    }

    echo json_encode($data);
?>